//
//  CollectionDeviceViewController.m
//  Rail
//
//  Created by hychen on 2018/3/8.
//  Copyright © 2018年 Hychen. All rights reserved.
//

#import "CollectionDeviceViewController.h"

@interface CollectionDeviceViewController ()
@property (nonatomic, strong) UIButton *favButton;
@end

@implementation CollectionDeviceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIView *bgView = [UIView new];
    bgView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:bgView];
    
    self.favButton = [UIButton buttonWithTitle:@"收藏设备" titleColor:ColorDefalutGray norImage:[UIImage imageNamed:@"monitoring_take_btn_n"] highImage:[UIImage imageNamed:@"monitoring_take_btn_p"] action:@selector(clickFavButton) owner:self];
    [self.favButton setTitleColor:kWhiteColor forState:UIControlStateHighlighted];
    [self.view addSubview:self.favButton];
    
    [self.favButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(40);
        make.centerX.equalTo(self.view);
        make.height.mas_equalTo(45);
        make.top.mas_equalTo(ResizeH(50));
    }];
    
    [bgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.mas_equalTo(0);
        make.bottom.equalTo(self.favButton).offset(ResizeH(50));
    }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)clickFavButton {
    if (self.BlockClickCollectDevice) {
        self.BlockClickCollectDevice();
    }
}

@end
